package 面向对象.实验六;


/**
 * @projectName: JAVA编程
 * @package: 面向对象.实验六
 * @className: Circle
 * @author: hhy帅
 * @description: TODO
 * @date: 2021/11/7 21:21
 */
public class Circle implements Shape {
    double radius;
    final double pi = 3.14;

    public Circle(double radius) {
        this.radius = radius;
    }

    @Override
    public double getPerimeter() {
        return 2 * pi * radius;
    }

    @Override
    public double getArea() {
        return pi * radius * radius;
    }
}
